package org.wattdepot.cli;

/**
 * Provides the help command for the command line interface.
 * 
 * @author Scott Wong and Kelli Sawai
 * 
 */
public class HelpCommand extends CommandLineInterface implements WattDepotCliCommand {

  /**
   * Displays a list of all the commands for the command line interface.
   * 
   * @param args The arguments passed in by the user.
   * @return The list of all commands for the command line.
   */
  public String doCommand(String args) {
    String output =
        "help\n\t"
            + "This message\n"
            + "quit\n\t"
            + "Exits the system\n"
            + "sources\n\t"
            + "Prints a table summarizing the public sources in the system, one per line.\n"
            + "source {source} summary\n\t"
            + "Prints information about a single source.\n"
            + "sensordata {source} timestamp {timestamp}\n\t"
            + "Prints information about a single sensor data instance.\n"
            + "dailysensordata {source} day {day}\n\t"
            + "Prints a table listing all of the sensor data instances for the specified day.\n"
            + "power {source} timestamp {timestamp}\n\t"
            + "Prints the power generated by the source at the given timestamp.\n"
            + "powerstats {source} day {day} sampling-interval {minutes} statistic "
            + "{max|min|average}\n\t"
            + "Returns the maximum, minimum, or average power generated by the "
            + "source for the day.\n"
            + "total [carbon|energy] {source} day {day} sampling-interval {minutes}\n\t"
            + "Returns the total amount of carbon (or energy) emitted by this source for "
            + "the given day.\n"
            + "chart power [generated|consumed] {source} {startday} {endday} sampling-interval "
            + "{minutes} file {file}\n\t"
            + "Writes out an html file that will display a chart illustrating the power for "
            + "the source over the interval.\n" + "fueltypes {source}\n\t"
            + "Returns a table of fuels associated with this source.\n"
            + "totalpower {source} {timestamp} fuelType {fuelType}\n\t"
            + "Returns the total power generated by the given fuel type.\n"
            + "carboncontent {source} {timestamp} sampling-interval {interval}\n\t"
            + "Returns the total carbon that would be emitted by that "
            + "source over an hour at the rate occurring as of the timestamp.";

    return output;
  }
}
